package com.lxb;

/**
 * ；两数相加
 */
public class TwoSum {

    public static void main(String[] args) {
        int nums[] = {3,2,4};
        int target = 6;
        for(int i = 0;i<= nums.length-1;i++){
            for (int j = i+1;j<=nums.length-1;j++){
                if((nums[i]+nums[j]) == target){
                    System.out.printf("[%d,%d]",i,j);
                }
            }
        }
    }
}
